package api

import (
	"net/http"
	"serve/model"
	"serve/response"

	"github.com/gin-gonic/gin"
)

// Login 用户登录
func Login(ctx *gin.Context) {
	//获取登录用户参数
	userLoginParam := &model.UserLoginParamDTO{}
	ctx.ShouldBind(userLoginParam)
	if userLoginParam.Username != "admin" {
		ctx.JSON(http.StatusOK, response.Erro("非admin用户不能登录"))
		return
	}
	ctx.JSON(http.StatusOK, response.Success("123"))
}
